#include "proc.h"
#include <string.h>
#include <unistd.h>
#define SIZE 101
#define STYLE '='
#define ARR '>'

void process()
{
  const char* table="|/-\\";
  char buf[SIZE];
  memset(buf,'\0',sizeof(buf));
  int i=0;
  for(i=0;i<=100;++i)
  {
    if(i!=100)
      buf[i]=ARR;
    printf("\033[0;31;46m[%-100s][%d%%][%c]\033[0m\r",buf,i,table[i%4]);
    fflush(stdout);
    buf[i]=STYLE;
    usleep(100000);
  }
  printf("\n");
}
